package com.ruoyi.work.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author: MMDZ
 * @Desc: TODO 项目配置
 */
public class WorkProject extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 项目ID */
    @Excel(name = "项目编号", cellType = ColumnType.NUMERIC)
    private Long projectId;

    /** 项目代码 */
    @Excel(name = "项目代码")
    private String projectCode;

    /** 项目经理id */
    private Long pmId;
    @Excel(name = "项目经理")
    private String pmName;
    /** 项目经理 */
    private SysUser pm;

    /** 项目当前开发阶段id */
    private Long stageId;
    @Excel(name = "当前开发阶段")
    private String stageName;
    /** 开发阶段 */
    private WorkStage stage;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    public Long getProjectId() {
        return projectId;
    }

    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }

    @NotBlank(message = "项目代码不能为空")
    public String getProjectCode() {
        return projectCode;
    }

    public void setProjectCode(String projectCode) {
        this.projectCode = projectCode;
    }

    @NotNull(message = "项目经理不能为空")
    public Long getPmId() {
        return pmId;
    }

    public void setPmId(Long pmId) {
        this.pmId = pmId;
    }

    public String getPmName() {
        return pmName;
    }

    public void setPmName(String pmName) {
        this.pmName = pmName;
    }

    public String getStageName() {
        return stageName;
    }

    public void setStageName(String stageName) {
        this.stageName = stageName;
    }

    public SysUser getPm() {
        return pm;
    }

    public void setPm(SysUser pm) {
        this.pm = pm;
    }

    @NotNull(message = "开发阶段不能为空")
    public Long getStageId() {
        return stageId;
    }

    public void setStageId(Long stageId) {
        this.stageId = stageId;
    }

    public WorkStage getStage() {
        return stage;
    }

    public void setStage(WorkStage stage) {
        this.stage = stage;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("projectId", getProjectId())
                .append("projectCode", getProjectCode())
                .append("pmId", getPmId())
                .append("pmName", getPmName())
                .append("stageId", getStageId())
                .append("stageName", getStageName())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
